#ifndef OBJECTIVEFORM_H
#define OBJECTIVEFORM_H

#include <QWidget>

// 前向声明
class ObjectiveChooseForm;

namespace Ui {
class ObjectiveForm;
}

class ObjectiveForm : public QWidget
{
    Q_OBJECT

public:
    explicit ObjectiveForm(QWidget *parent = nullptr);
    ~ObjectiveForm();

    void UpdateShowType(int type=0);
    
signals:
    // 信号：当物镜倍数变化时发出
    void objectiveMagnificationChanged(int magnification);

protected:
    void paintEvent(QPaintEvent *event) override;

private slots:
    void on_comboBox_currentIndexChanged(const QString &arg1);
    void on_toolButton_contractExpand_clicked(bool checked);
    
public slots:
    // 槽：设置comboBox的值
    void setComboBoxValue(const QString &text);
    
public:
    // 设置关联的ObjectiveChooseForm
    void setAssociatedObjectiveChooseForm(ObjectiveChooseForm *form);
    
private:
    // 关联的ObjectiveChooseForm指针
    ObjectiveChooseForm *m_associatedForm;

private:
    Ui::ObjectiveForm *ui;
};

#endif // OBJECTIVEFORM_H
